package com.szsanshan.station.datacollector.entity;

import com.alibaba.fastjson.annotation.JSONField;

import java.io.Serializable;
import java.util.Date;


/**
 * 油枪加油记录表
 *
 * @author zengxiang
 * @email 422823541@qq.com
 * @date 2018-01-19 20:04:51
 */
public class StationNozzleRecord implements Serializable, Comparable<StationNozzleRecord> {
    private static final long serialVersionUID = 1L;

    //		[{"ID":3,"NozNO":10,"OilName":"1095","OilShortName":"95#","NozPrice":7.35,"NozQTY":12.24,"NozMNY":90.0,"NozTotalBegin":20.41, "NozTotalEnd":32.65,
//			"BeginTime":"2018/1/30 17:33:38","EndTime":"2018/1/30 17:33:45","TankID":1,"TankOilHeight":1.0,"TankWaterHeight":1.0,"TankTmp":1.0,"TankQty":1.0,"TankDataTime":"2018/1/30 17:33:45"},{"ID":2,"NozNO":10,"OilName":"1095","OilShortName":"95#","NozPrice":7.35,"NozQTY":20.41,"NozMNY":150.0,"NozTotalBegin":0.0,"NozTotalEnd":20.41,"BeginTime":"2018/1/30 17:33:38","EndTime":"2018/1/30 17:33:44","TankID":1,"TankOilHeight":1.0,"TankWaterHeight":1.0,"TankTmp":1.0,"TankQty":1.0,"TankDataTime":"2018/1/30 17:33:44"},{"ID":1,"NozNO":4,"OilName":"2000","OilShortName":"0#","NozPrice":6.2,"NozQTY":1.63,"NozMNY":10.02,"NozTotalBegin":-1.63,"NozTotalEnd":0.0,"BeginTime":"2018/1/30 16:07:09","EndTime":"2018/1/30 16:07:09","TankID":4,"TankOilHeight":1.0,"TankWaterHeight":1.0,"TankTmp":1.0,"TankQty":1.0,"TankDataTime":"2018/1/30 16:07:09"}]
    //流水号
    private String id;
    //油枪编号
    private String nozno;
    //油品代码
    private String oilname;
    //油品简称
    private String oilshortname;
    //油机单价
    private String nozprice;
    //油机升数
    private String nozqty;
    //油机金额
    private String nozmny;
    //油枪开始累积升数
    private String noztotalbegin;
    //油枪结束累积升数
    private String noztotalend;
    //提枪时间
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date begintime;
    //挂枪时间
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date endtime;
    //油罐 ID
    private String tankid;
    //油罐油高
    private String tankoilheight;
    //油罐水高
    private String tankwaterheight;
    //油罐温度
    private String tanktmp;
    //油罐升数
    private String tankqty;
    //油罐数据更新时间
//	@JSONField(format="yyyy/MM/dd HH:mm:ss")
    private String tankdatatime;
    //支付码
    private String authcode;
    //优惠券id
    private String couponid;
    //站id
    private String stationid;
    //操作人
    private String operator;
    //勾兑加油记录
    private String settlekey;
    //站名称
    private String stationname;
    //会员号
    private String customerid;
    //公众号id
    private String openid;
    private String status;
    //结算方式
    private String type;
    // 班次ID
    private String shiftid;
    // 支付单号
    private String paymentno;
    //实付金额价格
    private String actualamount;
    // 交易记录类型
    private String transactiontype;

    private String cardid;

    //是否会员日
    private Boolean memberday;

    private String operatordate;

    private String jiayouyuan;

    public String getOperatordate() {
        return operatordate;
    }

    public void setOperatordate(String operatordate) {
        this.operatordate = operatordate;
    }

    public Boolean getMemberday() {
        return memberday;
    }

    public void setMemberday(Boolean memberday) {
        this.memberday = memberday;
    }

    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    public String getSettlekey() {
        return settlekey;
    }

    public void setSettlekey(String settlekey) {
        this.settlekey = settlekey;
    }

    public String getStationname() {
        return stationname;
    }

    public void setStationname(String stationname) {
        this.stationname = stationname;
    }

    /**
     * 获取：交易记录类型
     */
    public String getTransactiontype() {
        return transactiontype;
    }

    /**
     * 设置：交易记录类型
     */
    public void setTransactiontype(String transactiontype) {
        this.transactiontype = transactiontype;
    }

    public String getActualamount() {
        return actualamount;
    }

    public void setActualamount(String actualamount) {
        this.actualamount = actualamount;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    /**
     * 获取：支付单号
     */
    public String getPaymentno() {
        return paymentno;
    }

    /**
     * 设置：支付单号
     */
    public void setPaymentno(String paymentno) {
        this.paymentno = paymentno;
    }

    public String getShiftid() {
        return shiftid;
    }

    public void setShiftid(String shiftid) {
        this.shiftid = shiftid;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getCustomerid() {
        return customerid;
    }

    public void setCustomerid(String customerid) {
        this.customerid = customerid;
    }

    public String getStationid() {
        return stationid;
    }

    public void setStationid(String stationid) {
        this.stationid = stationid;
    }

    public String getAuthcode() {
        return authcode;
    }

    public void setAuthcode(String authcode) {
        this.authcode = authcode;
    }

    public String getCouponid() {
        return couponid;
    }

    public void setCouponid(String couponid) {
        this.couponid = couponid;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getNozno() {
        return nozno;
    }

    public void setNozno(String nozno) {
        this.nozno = nozno;
    }

    public String getOilname() {
        return oilname;
    }

    public void setOilname(String oilname) {
        this.oilname = oilname;
    }

    public String getOilshortname() {
        return oilshortname;
    }

    public void setOilshortname(String oilshortname) {
        this.oilshortname = oilshortname;
    }

    public String getNozprice() {
        return nozprice;
    }

    public void setNozprice(String nozprice) {
        this.nozprice = nozprice;
    }

    public String getNozqty() {
        return nozqty;
    }

    public void setNozqty(String nozqty) {
        this.nozqty = nozqty;
    }

    public String getNozmny() {
        return nozmny;
    }

    public void setNozmny(String nozmny) {
        this.nozmny = nozmny;
    }

    public String getNoztotalbegin() {
        return noztotalbegin;
    }

    public void setNoztotalbegin(String noztotalbegin) {
        this.noztotalbegin = noztotalbegin;
    }

    public String getNoztotalend() {
        return noztotalend;
    }

    public void setNoztotalend(String noztotalend) {
        this.noztotalend = noztotalend;
    }

    public Date getBegintime() {
        return begintime;
    }

    public void setBegintime(Date begintime) {
        this.begintime = begintime;
    }

    public Date getEndtime() {
        return endtime;
    }

    public void setEndtime(Date endtime) {
        this.endtime = endtime;
    }

    public String getTankid() {
        return tankid;
    }

    public void setTankid(String tankid) {
        this.tankid = tankid;
    }

    public String getTankoilheight() {
        return tankoilheight;
    }

    public void setTankoilheight(String tankoilheight) {
        this.tankoilheight = tankoilheight;
    }

    public String getTankwaterheight() {
        return tankwaterheight;
    }

    public void setTankwaterheight(String tankwaterheight) {
        this.tankwaterheight = tankwaterheight;
    }

    public String getTanktmp() {
        return tanktmp;
    }

    public void setTanktmp(String tanktmp) {
        this.tanktmp = tanktmp;
    }

    public String getTankqty() {
        return tankqty;
    }

    public void setTankqty(String tankqty) {
        this.tankqty = tankqty;
    }

    public String getTankdatatime() {
        return tankdatatime;
    }

    public void setTankdatatime(String tankdatatime) {
        this.tankdatatime = tankdatatime;
    }

    public String getCardid() {
        return cardid;
    }

    public void setCardid(String cardid) {
        this.cardid = cardid;
    }

    public String getJiayouyuan() {
        return jiayouyuan;
    }

    public void setJiayouyuan(String jiayouyuan) {
        this.jiayouyuan = jiayouyuan;
    }

    public int compareTo(StationNozzleRecord s) {
        int timeCompare = s.getEndtime().compareTo(this.getEndtime());
        if (timeCompare != 0) {
            return timeCompare;
        } else {
            int compare = s.getNozno().compareTo(this.getNozno());
            if (compare != 0) {
                return compare;
            } else {
                return s.getId().compareTo(this.getId());
            }
        }
    }
}
